package com.javen.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.javen.service.IUserService;
import com.javen.vo.LoginVO;

@Controller
@RequestMapping("/carInfo")
public class CarInfController {
	private static Logger log = LoggerFactory.getLogger(CarInfController.class);

	/**
	 * 车辆信息接口
	 * @param model
	 * @param loginVO
	 * @return
	 */
	@RequestMapping(value = "/add")
	public String add(Model model, LoginVO loginVO) {
		log.info("username:" + loginVO.getUsername());
		log.info("password:" + loginVO.getPassword());
		
		model.addAttribute("loginVO", loginVO.toString());
		return "login";
	}
	
	
	@RequestMapping(value = "/search")
	public String search(Model model, LoginVO loginVO) {
		log.info("username:" + loginVO.getUsername());
		log.info("password:" + loginVO.getPassword());
		
		model.addAttribute("loginVO", loginVO.toString());
		return "login";
	}
	
	@RequestMapping(value = "/del")
	public String del(Model model, LoginVO loginVO) {
		log.info("username:" + loginVO.getUsername());
		log.info("password:" + loginVO.getPassword());
		
		model.addAttribute("loginVO", loginVO.toString());
		return "login";
	}
	
	@RequestMapping(value = "/update")
	public String update(Model model, LoginVO loginVO) {
		log.info("username:" + loginVO.getUsername());
		log.info("password:" + loginVO.getPassword());
		
		model.addAttribute("loginVO", loginVO.toString());
		return "login";
	}
}
